﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace M.Warehouse.API.Controllers
{
    /// <summary>
    /// 测试控制器
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class TestController : ControllerBase
    {
        /// <summary>
        /// 获取Apollo测试数据(key值：ceshi)
        /// </summary>
        /// <param name="configuration"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        [HttpGet]
        [Route("Apollo")]
        public IActionResult ApolloTest([FromServices]IConfiguration configuration,string key)
        {
            var elkConfig = configuration[key];
            return Ok(elkConfig);
        }
    }
}
